'use client';

import { Difficulty } from '../types/game';

interface GameStatusProps {
  score: number;
  combo: number;
  difficulty: Difficulty;
  isInvincible: boolean;
  invincibilityTime: number;
  highScore: number;
  invincibleHitsCount: number;
  scoreToNextInvincible: number;
}

export default function GameStatus({
  score,
  combo,
  difficulty,
  isInvincible,
  invincibilityTime,
  highScore,
  invincibleHitsCount,
  scoreToNextInvincible,
}: GameStatusProps) {
  return (
    <div className="flex flex-col items-center gap-2 mt-4">
      <div className="text-2xl font-bold">
        分数: <span className={combo > 1 ? 'rainbow-text' : ''}>{score}</span>
      </div>
      
      <div className="text-xl">
        最高分: {highScore}
      </div>

      {combo > 1 && (
        <div className="text-lg text-yellow-500">
          连击: x{combo}
        </div>
      )}

      <div className="text-lg">
        难度: {difficulty.charAt(0) + difficulty.slice(1).toLowerCase()}
      </div>

      {isInvincible && (
        <div className="text-2xl font-bold golden-glow animate-pulse flex flex-col items-center">
          <div className="text-yellow-500">⚡ 无敌模式激活 ⚡</div>
          <div className="text-lg mt-1">剩余碰撞次数: {10 - invincibleHitsCount}</div>
        </div>
      )}

      {difficulty === Difficulty.HARD && !isInvincible && (
        <div className="text-lg">
          距离无敌模式: {scoreToNextInvincible - score} 分
          {scoreToNextInvincible - score <= 5 && (
            <span className="text-yellow-500 animate-pulse ml-2">即将获得无敌模式!</span>
          )}
        </div>
      )}
    </div>
  );
} 